using System.Windows.Media;

namespace Vec
{
	public class WPFCanvas
	{
		internal static readonly int ALL_SAVE_FLAG = 0;
		private DrawingContext drawingContext;

		public WPFCanvas(DrawingContext p1)
		{
			this.drawingContext = p1;
		}

		public void drawText(string ssss, float drawX, float drawY, WPFPaint sp2)
		{
			/* WPFPaint sp = (WPFPaint)sp2;
             gp.setColor(sp.color);
             gp.setStroke(sp.stro);
             gp.setFont(sp.font);
             gp.drawString(ssss, drawX, drawY - sp.getTextSize() * 0.8f);
             drawingContext.DrawText()*/
		}

		public void drawPath(WPFPath pa2, WPFPaint sp2)
		{
			WPFPath pa = (WPFPath)pa2;
			WPFPaint sp = (WPFPaint)sp2;
			/*gp.setColor(sp.color);
            gp.setStroke(sp.stro);
            if (!pa.isEmpty())
            {
                List<RectangularShape> sps = pa.sps;
                for (RectangularShape shape: sps)
                {
                    if (sp.style == WPFPaint.Style.FILL) gp.fill(shape);
                    else if (sp.style == WPFPaint.Style.STROKE) gp.draw(shape);
                }
                List<WPFPath.PF> pts = pa.pts;
                int[] xs = new int[pts.Count];
                int[] ys = new int[pts.Count];
                int i = 0;
                for (int j = 0; j < pts.Count; j++)
                {
                    WPFPath.PF p = pts[j];
                    //System.out.println(i+":"+p);
                    xs[i] = (int)p.x;
                    ys[i] = (int)p.y;
                    if (p.start && j != 0 || j == pts.Count - 1)
                    {
                        //System.out.println("draw");
                        int np = j == pts.Count - 1 ? i + 1 : i;
                        if (sp.style == WPFPaint.Style.FILL) gp.fillPolygon(xs, ys, np);
                        else if (sp.style == WPFPaint.Style.STROKE) gp.drawPolyline(xs, ys, np);
                        i = 0;
                    }
                    else
                    {
                        i++;
                    }
                }
            }*/
		}

		public void restore()
		{
		}

		public int getWidth()
		{
			return 0;
		}

		public int getHeight()
		{
			return 0;
		}

		public int saveLayer(int i, int i1, int width, int height, WPFPaint sp, int aLL_SAVE_FLAG)
		{
			return 0;
		}

		public void clipRect(Rect b)
		{
			//gp.clipRect(b.left, b.top, b.width(), b.height());
		}

		public void drawColor(int backgcolor)
		{
			//drawingContext.DrawRectangle(null,null,)
			// gp.setBackground(new Color(backgcolor, true));
		}

		public void restoreToCount(int i)
		{
		}
	}
}